export default{
    install(Vue,options)
    {
        Vue.prototype.getData = function (router, params) {//请求服务器端统一处理
                var _this = this;
                var data;

                axios.post(router, params)
                    .then(function (res) {
                        if(res.data.code === 200){
                            data =  res;
                        }else {
                            _this.$message({
                                showClose: true,
                                message: res.data.msg,
                                type: 'error'
                            });
                        }
                    })
                    .catch(function (error) {
                        _this.$message({
                            showClose: true,
                            message: error,
                            type: 'error'
                        });
                    });

        },
        Vue.prototype.inArray = function (){
            return true;
        }
    }
}